package cn.huiyunche.base.service.interfaces;

import cn.huiyunche.base.service.model.BVehicle;
import cn.huiyunche.base.service.model.BVehicleBrand;
import cn.huiyunche.base.service.vo.BVehicleBrandVo;
import cn.huiyunche.base.service.vo.BVehicleSearchVo;
import cn.huiyunche.base.service.vo.PageVo;
import cn.huiyunche.tools.basic.exceptions.BusinessException;

import java.util.List;
import java.util.Map;

/**
 * 车系接口类
 *
 * @author Administrator
 */
public interface BVehicleService {

    /**
     * 根据品牌ID查询车系
     *
     * @param brandId 品牌ID
     * @return List<Vehicles>
     * @throws BusinessException
     */
    List<BVehicle> selectVehiclesByBrandId(String brandId) throws Exception;

    /**
     * 查询所有车系
     *
     * @return List<Vehicles>
     * @throws BusinessException
     */
    List<BVehicle> selectVehiles() throws Exception;

    /**
     * 模糊查询
     *
     * @param name
     * @return
     */
    BVehicle selectLikeName(String brandName, String vehicleName);

    /**
     * 查询key
     *
     * @param brandKey
     * @param vehicleKey
     * @return
     */
    List<BVehicle> selectLikeBrandNameANDVehicleName(String brandKey, String vehicleKey);

    /**
     * @param vehicleId 车型信息id
     * @return
     * @Title: getById
     * @Description: 根据id查询车型信息
     * @return: BVehicle
     */
    BVehicle getById(long vehicleId);

    /**
     * 根据主键查询 车系信息
     *
     * @param vehicleId
     * @return
     */
    BVehicle selctById(Long vehicleId);


    /**
     * 模糊查询 车系，品牌
     *
     * @param keystr
     * @return
     */
    List<BVehicleSearchVo> selectLikeBrandNameORVehicleName(String keystr);

    /**
     * 车辆信息维护列表
     *
     * @param pageVo
     * @param vo
     * @return
     * @throws Exception
     */
    Map<String, Object> selectVehicleByParams(PageVo pageVo, BVehicleBrandVo vo) throws Exception;

    /**
     * 车型数据修改
     *
     * @param vehicle
     * @return
     * @throws Exception
     */
    int modify(BVehicle vehicle) throws Exception;

    /**
     * 查询所有品牌
     *
     * @return
     * @throws Exception
     */
    List<BVehicleBrand> loadBrand() throws Exception;

    /**
     * 查询所有车系
     *
     * @return
     * @throws Exception
     */
    List<BVehicle> loadVehicle(Long brandId) throws Exception;
}
